import React from 'react';
import {View, Text, StyleSheet,} from 'react-native';
import Btn from './Btn';
import { useInstall } from '../context';


const Shop = () => {
  const { setIsInstall } = useInstall();

  return (
    <View style={styles.btnBox}>
      <Text>Shop</Text>
      <Btn
        style={styles.btn}
        font={{ color: '#fff', fontSize: 20 }}
        onPress={() => {
          setIsInstall(false);
          AsyncStorage.clear();
        }}
      >
        我要退出
      </Btn>
    </View>
  )
}
const styles = StyleSheet.create({

  btnBox: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center'
  },
  btn: {
    backgroundColor: 'red',
    height: 0.05 * h,
    width: 0.3 * w,
    borderRadius: 15
  }
})
export default Shop;